package JavaSE.d4;
import java.util.Scanner;

public class Test25 {
    public static void main(String[] args) {
        String article[]={"the","a","one","some","any"};
        String noun[]={"boy","girl","dog","town","cat"};
        String verb[]={"drove","jumped","ran","walked","skipped"};
        String preposition[]={"to","from","over","under","on"};

        String word[][]={article,noun,verb,preposition,article,noun};
        Scanner scanner = new Scanner(System.in);

        String s2=scanner.nextLine();
        while (s2.equals("")){
            StringBuffer s=new StringBuffer();
            for (int i = 0; i < word.length; i++) {
                s.append(word[i][(int)(Math.random()*5)]);
                s.append(" ");
            }
            //首字母转换大写
            String s1=s.substring(0,1);
            s.replace(0,1,s1.toUpperCase());
            //输出
            System.out.println(s);
            s2=scanner.nextLine();
        }
    }
}
